#if !defined(ENGINE_HPP)
#define ENGINE_HPP

#include <GLES3/gl3.h>
#include <EGL/egl.h>

#include <common/zj_logger.h>
#include <common/zj_string.hpp>
#define ZJ_USES_ANDROID_NATIVE_APP_GLUE
#include <draw/zj_draw.hpp>

class Engine {
    public:
        Engine(struct android_app* app);
        ~Engine();
        
        void init();
        void destroy();
        void draw();
        void loop();
        void handle_cmd(struct android_app* app, int32_t cmd);
        int32_t handle_input(struct android_app* app, AInputEvent *event);
    private:
        struct android_app* app;
        zj_string data_path;
        zj_egl_state egl;
        bool can_draw;
        bool need_draw;
        zj_pen* pen;
        int32_t hx, hy;
        int32_t w, h;
};


#endif //ENGINE_HPP